﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>监视器函数列表 | AutoHotkey v2</title>
<meta name="description" content="This page lists functions 遍历 retrieving screen resolution and multi-monitor info." />
<meta name="ahk:equiv-v1" content="commands/SysGet.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>监视器函数</h1>

<p>用于检索屏幕分辨率和多显示器信息的函数. 点击函数名获取详细信息.</p>
<table class="info">
    <tr>
        <th>函数</th>
        <th>描述</th>
    </tr>
    <tr>
        <td><a href="MonitorGet.htm">获取显示器</a></td>
        <td>检查指定的监视器是否存在, 并可选地检索其边界坐标.</td>
    </tr>
    <tr>
        <td><a href="MonitorGetCount.htm">获取显示器总数</a></td>
        <td>返回监视器的数量.</td>
    </tr>
    <tr>
        <td><a href="MonitorGetName.htm">获取显示器名称</a></td>
        <td>返回指定监视器的操作系统名称.

.</td>
    </tr>
    <tr>
        <td><a href="MonitorGetPrimary.htm">获取显示器编号</a></td>
        <td>返回主监视器的编号.</td>
    </tr>
    <tr>
        <td><a href="MonitorGetWorkArea.htm">获取显示器工作区域</a></td>
        <td>检查指定的监视器是否存在, 并可选地检索其工作区域的边界坐标.</td>
    </tr>
</table>

<h2 id="Remarks">备注</h2>
<p>内置变量 <a href="../Variables.htm#Screen">内_屏幕宽</a> 和 <a href="../Variables.htm#Screen">内_屏幕高</a> 包含主监视器的尺寸(以像素为单位).</p>
<p>可以使用 <a href="SysGet.htm">获取系统属性</a> 检索所有显示监视器的边框. 例如, 它检索虚拟屏幕的宽度和高度:</p>
<pre>信息框 获取系统属性(78) " x " 获取系统属性(79)</pre>

<h2 id="Related">相关</h2>
<p><a href="DllCall.htm">动态库调用</a>, <a href="Win.htm">窗口函数</a>, <a href="SysGet.htm">获取系统属性</a></p>

<h2 id="Examples">示例</h2>
<div class="ex" id="ExLoopAll">
<p><a href="#ExLoopAll">#1</a>: 显示每个监视器的信息:</p>
<pre>MonitorCount := 获取显示器总数()
MonitorPrimary := 获取显示器编号()
信息框 "Monitor Count:`t" MonitorCount "`nPrimary Monitor:`t" MonitorPrimary
循环 MonitorCount
{
    获取显示器 内_循环次数, L, T, R, B
    获取显示器工作区域 内_循环次数, WL, WT, WR, WB
    信息框
    (
        "Monitor:`t#" 内_循环次数 "
        Name:`t" 获取显示器名称(内_循环次数) "
        Left:`t" L " (" WL " work)
        Top:`t" T " (" WT " work)
        Right:`t" R " (" WR " work)
        Bottom:`t" B " (" WB " work)"
    )
}</pre>
</div>

</body>
</html>